﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CoderJoe
{
    public class Controller
    {
        public Model Get(int id)
        {
            Model model = new Model();
            model.Id = id;
            model.Email = "joe@example.com";
            model.Name = "Joe";

            return model;
        }

        public Model Create(Model model)
        {
            int id = 0;
            // Save to Database
            // assign id back to id
            return Get(id);
        }

        public Model Update(Model model)
        {
            // Save to Database
            return Get(model.Id);
        }
    }
}
